﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="ManageSteps.aspx.cs" Inherits="FatFreeFitness._secured.management.ManageSteps" masterpagefile="../../_layout/_master/AdminMaster.master" %>
<asp:Content id="Content1" runat="Server" contentplaceholderid="AdminContent">
    <div>
    
        <asp:FormView ID="FormView1" runat="server" DataKeyNames="ID" 
            DataSourceID="EntityDsSteps" DefaultMode="Insert" 
            oniteminserted="FormView1_ItemInserted" Width="597px" >
            <InsertItemTemplate>
                Name:
                <asp:TextBox ID="NameTextBox" runat="server" Text='<%# Bind("Name") %>' />
                <br />
                Description:
                <asp:TextBox ID="DescriptionTextBox" runat="server" 
                    Text='<%# Bind("Description") %>' />
                <br />
                Default Sets:
                <asp:DropDownList ID="ddlSets" runat="server" 
                    SelectedValue='<%# Bind("DefaultSets") %>'>
                    <asp:ListItem>1</asp:ListItem>
                    <asp:ListItem>2</asp:ListItem>
                    <asp:ListItem>3</asp:ListItem>
                </asp:DropDownList>
                <br />
                Default Reps:
                <asp:DropDownList ID="ddlReps" runat="server" 
                    SelectedValue='<%# Bind("DefaultReps") %>'>
                    <asp:ListItem>8</asp:ListItem>
                    <asp:ListItem>10</asp:ListItem>
                    <asp:ListItem>12</asp:ListItem>
                </asp:DropDownList>
                <br />
                Base Resistance:
                <asp:DropDownList ID="ddlResistance" runat="server" 
                    SelectedValue='<%# Bind("BaseResistance") %>'>
                    <asp:ListItem>5</asp:ListItem>
                    <asp:ListItem>10</asp:ListItem>
                    <asp:ListItem>25</asp:ListItem>
                    <asp:ListItem>50</asp:ListItem>
                    <asp:ListItem>100</asp:ListItem>
                    <asp:ListItem>150</asp:ListItem>
                </asp:DropDownList>
                <br />
                Resource:
                <asp:DropDownList ID="ddlResources" runat="server" DataSourceID="EntityDsResources" 
                    DataTextField="Name" DataValueField="ID" 
                    SelectedValue='<%# Bind("ResourceID") %>'>
                </asp:DropDownList>
                <br />
                <br />
                <asp:LinkButton ID="InsertButton" runat="server" CausesValidation="True" 
                    CommandName="Insert" Text="Insert" />
&nbsp;<asp:LinkButton ID="InsertCancelButton" runat="server" CausesValidation="False" 
                    CommandName="Cancel" Text="Cancel" />
            </InsertItemTemplate>
        </asp:FormView>
        <br />
    
        <telerik:RadGrid ID="RadGrid1" runat="server" AutoGenerateColumns="False" 
            AutoGenerateDeleteColumn="True" AutoGenerateEditColumn="True" CellSpacing="0" 
            DataSourceID="EntityDsSteps" GridLines="None">
<MasterTableView DataKeyNames="ID" DataSourceID="EntityDsSteps">
<CommandItemSettings ExportToPdfText="Export to PDF"></CommandItemSettings>

<RowIndicatorColumn Visible="True" FilterControlAltText="Filter RowIndicator column">
<HeaderStyle Width="20px"></HeaderStyle>
</RowIndicatorColumn>

<ExpandCollapseColumn Visible="True" FilterControlAltText="Filter ExpandColumn column">
<HeaderStyle Width="20px"></HeaderStyle>
</ExpandCollapseColumn>

    <Columns>
        <telerik:GridBoundColumn DataField="ID" DataType="System.Int32" 
            FilterControlAltText="Filter ID column" HeaderText="ID" ReadOnly="True" 
            SortExpression="ID" UniqueName="ID">
        </telerik:GridBoundColumn>
        <telerik:GridBoundColumn DataField="Name" 
            FilterControlAltText="Filter Name column" HeaderText="Name" 
            SortExpression="Name" UniqueName="Name">
        </telerik:GridBoundColumn>
        <telerik:GridBoundColumn DataField="Description" 
            FilterControlAltText="Filter Description column" HeaderText="Description" 
            SortExpression="Description" UniqueName="Description">
        </telerik:GridBoundColumn>
        <telerik:GridBoundColumn DataField="DefaultSets" DataType="System.Int32" 
            FilterControlAltText="Filter DefaultSets column" HeaderText="DefaultSets" 
            SortExpression="DefaultSets" UniqueName="DefaultSets">
        </telerik:GridBoundColumn>
        <telerik:GridBoundColumn DataField="DefaultReps" DataType="System.Int32" 
            FilterControlAltText="Filter DefaultReps column" HeaderText="DefaultReps" 
            SortExpression="DefaultReps" UniqueName="DefaultReps">
        </telerik:GridBoundColumn>
        <telerik:GridBoundColumn DataField="BaseResistance" DataType="System.Int32" 
            FilterControlAltText="Filter BaseResistance column" HeaderText="BaseResistance" 
            SortExpression="BaseResistance" UniqueName="BaseResistance">
        </telerik:GridBoundColumn>
        <telerik:GridDropDownColumn DataField="ResourceID" DataSourceID="EntityDsResources" 
            FilterControlAltText="Filter column column" HeaderText="Resource" 
            ListTextField="Name" ListValueField="ID" UniqueName="ResourceID">
        </telerik:GridDropDownColumn>
    </Columns>

<EditFormSettings>
<EditColumn FilterControlAltText="Filter EditCommandColumn column"></EditColumn>
</EditFormSettings>
</MasterTableView>

<FilterMenu EnableImageSprites="False">
<WebServiceSettings>
<ODataSettings InitialContainerName=""></ODataSettings>
</WebServiceSettings>
</FilterMenu>

<HeaderContextMenu CssClass="GridContextMenu GridContextMenu_Default">
<WebServiceSettings>
<ODataSettings InitialContainerName=""></ODataSettings>
</WebServiceSettings>
</HeaderContextMenu>
        </telerik:RadGrid>
        <br />
    
    </div>
    <asp:EntityDataSource ID="EntityDsSteps" runat="server" 
        ConnectionString="name=FatFreeFitnessEntities" 
        DefaultContainerName="FatFreeFitnessEntities" EnableDelete="True" 
        EnableFlattening="False" EnableInsert="True" EnableUpdate="True" 
        EntitySetName="TemplateSteps" Where='' 
        Include="Resource">
    </asp:EntityDataSource>
    <asp:EntityDataSource ID="EntityDsResources" runat="server" 
        ConnectionString="name=FatFreeFitnessEntities" 
        DefaultContainerName="FatFreeFitnessEntities" EnableFlattening="False" 
        EntitySetName="Resources" Select="it.[ID], it.[Name]">
    </asp:EntityDataSource>
    </asp:Content>
